-- GENERATED SPELL FOR [Gor'marok the Ravager] --


function spell0_12046(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12046', 551, 1)
end

function spell1_12046(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_12046', 644, 1)
end

function spell2_12046(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12046', 5331, 1)
end

function Sorts_12046(pUnit, Event)
local choix_sorts_12046 = math.random(0, 2)
if choix_sorts_12046 == 0 then
pUnit:RegisterEvent('spell0_12046', 1, 1)
end
if choix_sorts_12046 == 1 then
pUnit:RegisterEvent('spell1_12046', 1, 1)
end
if choix_sorts_12046 == 2 then
pUnit:RegisterEvent('spell2_12046', 1, 1)
end
end

function mob12046_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12046', math.random(1500, 3000), 1)
end

function mob12046_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12046_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12046_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12046, 1, 'mob12046_Action')
RegisterUnitEvent(12046, 2, 'mob12046_Leave')
RegisterUnitEvent(12046, 3, 'mob12046_Kill')
RegisterUnitEvent(12046, 4, 'mob12046_Die')
